<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <title>contoller-model separation</title>
  <link rel="stylesheet" type="text/css" media="all" href="../main.css">
  <script type="text/javascript" src="../main.js"></script>
</head>
<body>
<script type="text/javascript">
   makeNavBar("../");
</script>
<h1>Controller-Model separation</h1>
The current design of Makumba BL API (page-based BL lookup, on_new,
on_edit,&nbsp; etc) is simple but it has bad model-controller
separation. Some parts of this code should be closer to the data types
(MDDs) and some other parts (specific to the form details) should be
kept near the form. One idea is to actually make these parts static
methods in the JSP like so:<br>
<pre>&lt;mak:form id="blabla" ...&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &lt;mak:input name="gluglu" /&gt;<br>&lt;/mak:form&gt;</pre>
<pre>&lt;%! <br>public void validateBlabla(Dictionary data){<br>&nbsp;&nbsp; etc<br>}</pre>
<pre>public void validateBlablaGluglu ( String Object){<br><br>}<br>%&gt;</pre>
Brief:<br>
<ul>
  <li>connsider versions for how "BL code near MDD" would look like<br>
  </li>
  <li>consider some concrete business logic cases, and how would they
be written in this new framework</li>
  <li>look at <a href="struts-multiple_forms.html">Struts</a> and see
what other techniques can be learned from there.<br>
  </li>
</ul>
<br>
</body>
</html>
